import trainingRequest from "@/utils/trainingRoom/trainingRequest";

export interface trainingContentModel {
    canAccess: boolean,
    contentCount: number,
    cover: string,
    createMethod: string,
    creator: string,
    deleteFlag: boolean,
    id: string,
    isDelete: number,
    openOutside: number,
    planAddCount: number,
    planName: string,
    status: string,
    weekTrainedCount: number,
    weekTrainedDuration: number,
    weeklyPlanCount: number,
    weeklyPlanDuration: number
}

export type trainingContentList = trainingContentModel[]

export interface trainingModel {
    content: trainingContentList,
    first: true,
    last: true,
    number: number,
    numberOfElements: number,
    offset: null,
    size: number,
    sort: null,
    statistics: null,
    totalElements: number,
    totalPages: number,
    useOffset: boolean
}

export const getTraining = () => {
    return trainingRequest.get<any, trainingModel>(`/mock/training`)
}
